package com.donleo.user;

import com.donleo.user.rule.RibbonRuleConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @author liangd
 * @since 2021-01-09 17:31
 * 注解作用:
 * 1.@SpringBootApplication    SpringBoot 启动类注解
 * 2.@EnableDiscoveryClient    启用客户端注解
 * 3.@EnableFeignClients       启用声明式服务调用注解
 * 4.@MapperScan               扫描Mapper层接口
 * 5.@RibbonClient             负载均衡客户端注解   name:服务名称，configuration：加载配置类
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@MapperScan("com.donleo.user.mapper")
@RibbonClient(name = "word-app", configuration = RibbonRuleConfig.class)
public class UserApp {
    public static void main(String[] args) {
        SpringApplication.run(UserApp.class, args);
    }
}
